package com.simple.security.controller;

import com.mmm.station.security.annotation.Power;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2016/12/10.
 */
@RestController
public class TestController {

    @Autowired
    private ValueOperations<Object,Object> redis;

    @RequestMapping(value = "")
    public Object index(){
        redis.set("test","你好");
        return "你好，欢迎进入首页";
    }



    @RequestMapping(value = "task")
    public Object task(){
        return redis.get("test");
    }




}
